package com.zxb.core.common.exception;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Zxb
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class BusinessException extends RuntimeException implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer code;
	private String msg;

	public BusinessException(E e){
        this.code = e.getCode();
        this.msg = e.getMsg();
    }
	public BusinessException(E e, String suffix){
        this.code = e.getCode();
        this.msg = suffix + e.getMsg();
    }
}
